package com.ruoyi.mall.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.ruoyi.mall.domain.MallTimeWithdraw;

/**
 * 返佣提现Mapper接口
 *
 * @author ruoyi
 * @date 2022-03-03
 */
public interface MallTimeWithdrawMapper
{
    /**
     * 查询返佣提现
     *
     * @param id 返佣提现主键
     * @return 返佣提现
     */
    public MallTimeWithdraw selectMallTimeWithdrawById(Long id);

    /**
     * 查询返佣提现列表
     *
     * @param mallTimeWithdraw 返佣提现
     * @return 返佣提现集合
     */
    public List<MallTimeWithdraw> selectMallTimeWithdrawList(MallTimeWithdraw mallTimeWithdraw);

    /**
     * 新增返佣提现
     *
     * @param mallTimeWithdraw 返佣提现
     * @return 结果
     */
    public int insertMallTimeWithdraw(MallTimeWithdraw mallTimeWithdraw);

    /**
     * 修改返佣提现
     *
     * @param mallTimeWithdraw 返佣提现
     * @return 结果
     */
    public int updateMallTimeWithdraw(MallTimeWithdraw mallTimeWithdraw);

    /**
     * 删除返佣提现
     *
     * @param id 返佣提现主键
     * @return 结果
     */
    public int deleteMallTimeWithdrawById(Long id);

    /**
     * 批量删除返佣提现
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMallTimeWithdrawByIds(Long[] ids);

    /**
     * 查询我的返佣金额
     *
     * @param userId 用户ID
     * @return 返佣提现
     */
    public BigDecimal selectTimeWithdrawRakeBackByUserId(Long userId);

    /**
     * 查询我的提现金额
     *
     * @param userId 用户ID
     * @return 返佣提现
     */
    public BigDecimal selectTimeWithdrawCashOutByUserId(Long userId);

    /**
     * 今日获得
     *
     * @param userId 用户ID
     * @return 返佣提现
     */
    BigDecimal selectTimeWithdrawTodayGainByUserId(Long userId);

    /**
     * 近七日获得
     *
     * @param userId 用户ID
     * @return 返佣提现
     */
    BigDecimal selectTimeWithdrawSevenDaysGainByUserId(Long userId);

    /**
     * 查询我的佣金列表
     *
     * @param userId 返佣提现
     * @param type 返佣提现
     * @return 返佣提现集合
     */
    public List<MallTimeWithdraw> selectMyWithdrawList(Long userId, Integer type);

    /**
     * 历史数据折线图（分佣金额）
     */
    public Map<String,Object> queryHistoryLineChartSharePrice(Map<String,Object> map);
}
